<?php

namespace app\model\not_del;

use think\Model;
use think\model\relation\BelongsTo;

/**
 * 用户标签关系表
 */
class UserTagModel extends Model
{
    protected $name = 'user_tag';


    /**
     * 关联标签
     * @return BelongsTo
     */
    public function tag(): BelongsTo
    {
        return $this->belongsTo(TagModel::class,'tag_id')->bind(['tag_name' => 'name','tag_icon' => 'icon']);
    }

}